{%include file="header.html" %} 
      
		<div id="page" class="view">
             {%include file="top.html" %} 
           {%include file="shadow.html" %} 
            
            <div class="wfx">
               


                <div class="CloseupRight">
                    <div class="wt clearfix">
						<div id="PinPinner"  class="link_tag">


						  <a href="/mblog/" {%if  !$g_show.tag_id%}class="cur"{%/if%} >所有美图</a>
						 {%section name=count loop=$g_show.tag_list%}
						  <a href="/mblog/index_{%$g_show.tag_list[count].id%}.html" {%if $g_show.tag_list[count].id == $g_show.tag_id%}class="cur"{%/if%}  >{%$g_show.tag_list[count].tag_name%}</a>
						{%/section%}
					  </div>

					 

                        <div id="pin_comments">
						<div class="page-v3">{%$g_show.page_bar%}</div>
						{%section name=count loop=$g_show.list%}
							<div class="comment clearfix" data-id="{%$g_show.list[count].id%}">
								<div class="fr" id="comment_action_btns">
									<a class="pinViewReplyButton" title="分享" data-name="{%$g_show.list[count].create_nickname%}">
									</a>
									
								</div>
								<a class="img x" target="_blank" href="/user/{%$g_show.list[count].create_uid%}.html">
									<img class="avatar" width=50 height=50  alt="{%$g_show.list[count].create_nickname%}" src="{%$g_show.list[count].head_url%}">
								</a>
								<p class="meta">
									<a class="author" target="_blank" href="/user/{%$g_show.list[count].create_uid%}.html">
										{%$g_show.list[count].create_nickname%}
									</a>
									&nbsp;:&nbsp;
									<span class="ts-words">
										{%$g_show.list[count].create_time%}
									</span>
									
								</p>
								<p class="text">
									<a target="_blank" href="{%$g_show.list[count].domain_url%}/mblog/detail_{%$g_show.list[count].id%}.html">{%$g_show.list[count].content%}</a><br>
									<img {%if $g_show.list[count].pic_height_pubu > 300 %}class="height_500"{%else%}class="width_440"{%/if%} src="{%$g_show.list[count].pic%}" href="{%$g_show.list[count].domain_url%}/mblog/detail_{%$g_show.list[count].id%}.html" alt="{%$g_show.list[count].content%}">
								</p>
								<p class="text">
								tag:<a href="{%$g_show.list[count].domain_url%}/mblog/index_{%$g_show.list[count].tag_id%}.html">{%if $config.current_site_id eq '0'%}{%$g_show.list[count].topic%}{%/if%}{%$g_show.list[count].tag_name%}</a> 来自：{%$g_show.list[count].source%} 
								</p>
							</div>


						{%/section%}

							<div class="page-v3">{%$g_show.page_bar%}</div>
                        </div>
						{%if $g_show.current_user_info%}
						<div class="clearfix" data-id="33041272" id="PinAddComment">
							<div id="PinInputArea">
								<a class="img x" title="" >
									<img class="avatar" src="http://tp3.sinaimg.cn/{%$g_show.current_user_info.uid%}/50/5635936750/1">
								</a>
								<div class="InputContainer Form FancyForm">
									<textarea name="caption" id="CloseupComment" autocomplete="off"></textarea>
									<ul class="ac-choices" style="display: none; z-index: 42; opacity: 0;">
									</ul>
									<label style="display: none;">
										添加评论或@好友
									</label>
									<span class="fff">
									</span>
								</div>
								<div style="display: block;" id="PinAddCommentControls">
									<a class="btn btn13 wbtn" onclick="return false;" href="javascript:void(0);" id="PostComment">
										<strong>
											添加评论
										</strong>
										<span>
										</span>
									</a>
								</div>
							</div>
						</div>
						{%/if%}

					
		


					<div id="pin_toolbar"><ul><li><div class="PriorAndNext"><a class="prev  x self" title="上一页" {%if $g_show.prev%} href="{%$g_show.prev%}"{%else%}onclick="alert('这已经是第一页了')"{%/if%}></a><a class="next  x self" title="下一页" {%if $g_show.next%}href="{%$g_show.next%}" {%else%}onclick="alert('这已经是最后一页了')"{%/if%}></a></div>
					</ul></div>

                </div>
            </div>
             <div class="CloseupLeft">
					 {%include file="right.html" %} 
				
				</div>
        </div>
        <div class="clear">
        </div>
       
		{%include file="footer_js.html" %}    

		<script>

$(function(){
	$(".detail_add_like").bind("click",function(e){
				
				id = $(this).attr("data-id");
				
				$.getJSON("/interface/user/json_add_like_to_mblog.php?id="+id+"&t=jsonp&callback=?", function(json){
				
					if(typeof(json)!='undefined')
					{
						
						if(json.error == 0)
						{
							var num = parseInt($(e.target).parents(".favorite").find(".count_love_num").text())+1;
						
							$(e.target).parents(".favorite").find(".count_love_num").text(num)
							YOUXIXIU.MAIN.Tips.Show(json.errmsg);
								
						}
						else
						{
							YOUXIXIU.MAIN.Tips.Show(json.errmsg);
						}
						
					}
					
				});


					
			});


	$("#PostComment").die("click");
		$("#PostComment").live("click",function(e){
			var id = "{%$g_show.id%}";
			var content = $("#CloseupComment").val();
			content = encodeURIComponent(content);
			$.getJSON("/interface{%$g_show.list[count].domain_url%}/mblog/json_add_mblog_reply.php?t=jsonp&id="+id+"&content="+content+"&callback=?", function(json){
			if(typeof(json)!='undefined')
			{

				if(json.error == 1)
				{
					YOUXIXIU.MAIN.Tips.Show(json.errmsg);
				}
				else
				{
				
					YOUXIXIU.MAIN.Tips.Show(json.errmsg);
					location.reload();
					
						
				}
				

				
			}
			
			
				
		});

		
	});


	$(".pinViewReplyButton").bind("click",function(e){

		var nick = "回复@"+ $(e.target).attr("data-name")+":";
		$("#CloseupComment").val(nick);
		
	})

	$(".DeleteComment").bind("click",function(e){
		
			var parent = $(this).parents(".comment");
			var id = parent.attr("data-id");
		
			$.getJSON("/interface{%$g_show.list[count].domain_url%}/mblog/json_add_mblog_reply.php?t=jsonp&type=del&id="+id+"&callback=?", function(json){
			if(typeof(json)!='undefined')
			{

				if(json.error == 1)
				{
					YOUXIXIU.MAIN.Tips.Show(json.errmsg);
				}
				else
				{
				
					YOUXIXIU.MAIN.Tips.Show(json.errmsg);
					parent.hide();
					
						
				}
				

				
			}
			
			
		
			});
		});


	$(".height_500").live("click",function(e)
	{
	
		$(e.target).removeClass("height_500");
		$(e.target).addClass("width_440");
		
	})

	$(".width_440").live("click",function(e)
	{
		
		window.open($(e.target).attr("href"));
		
	})

});
		

</script>


  {%include file="footer.html" %} 